//
// Created by 34753 on 2025/6/20.
//

#ifndef STUDENT_H
#define STUDENT_H

#include <QObject>
#include <QString>

class Student : public QObject
{
    Q_OBJECT
    Q_PROPERTY(QString id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
    Q_PROPERTY(QString gender READ gender WRITE setGender NOTIFY genderChanged)
    Q_PROPERTY(QString college READ college WRITE setCollege NOTIFY collegeChanged)
    // 其他属性类似...

public:
    explicit Student(QObject *parent = nullptr);

    Student(const QString &id, const QString &name, const QString &gender,
            const QString &college, const QString &department,
            const QString &classname, const QString &dorm,
            const QString &hometown, const QString &phone,
            QObject *parent = nullptr);

    // Getter方法
    QString id() const;

    QString name() const;

    QString gender() const;

    QString college() const;

    QString department() const;

    QString classname() const;

    QString dorm() const;

    QString hometown() const;

    QString phone() const;

    // Setter方法
    void setId(const QString &id);

    void setName(const QString &name);

    void setGender(const QString &gender);

    void setCollege(const QString &college);

    void setDepartment(const QString &department);

    void setClassname(const QString &classname);

    void setDorm(const QString &dorm);

    void setHometown(const QString &hometown);

    void setPhone(const QString &phone);

signals:
    void idChanged();

    void nameChanged();

    void genderChanged();

    void collegeChanged();

    void departmentChanged();

    void majorChanged();

    void dormChanged();

    void hometownChanged();

    void phoneChanged();

    // 其他属性改变信号...

private:
    QString m_id;
    QString m_name;
    QString m_gender;
    QString m_college;
    QString m_department;
    QString m_classname;
    QString m_dorm;
    QString m_hometown;
    QString m_phone;
};


#endif //STUDENT_H
